<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

   <div id="app">
         {{counter}}
      <button @click="inc">+</button>
      <button @click="dec">-</button>
       </div>


       <script src="js/vue.js"></script>
       <script>
         const app=new Vue({
           el: '#app',
           data: {
             message:'你好vue',
             counter: 0,
           },
           methods:{
             inc(){
               this.counter++;
             },
             dec(){
               this.counter--;
             }
           }
         })
       </script>
</body>
</html>